package com.higgins.client.components;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Logger;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.higgins.client.GreetingService;
import com.higgins.client.GreetingServiceAsync;
import com.higgins.client.dataModel.CoveringLetterDTO;
import com.higgins.client.dataModel.RecipientCountDTO;
import com.higgins.client.dataModel.StatusDTO;
import com.higgins.client.generic.components.GenericColumns;
import com.higgins.client.generic.components.GenericColumn;

public class StrategyColumns extends GenericColumns	{
	private static final Logger log = Logger.getLogger(StrategyColumns.class.getName());
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);

	public StrategyColumns()	{
		super();
		initialiseColumns();
	}
	private void initialiseColumns()	{
		GenericColumn genericColumn = new GenericColumn();
		genericColumn.setTitle("ID");
		genericColumn.setIndex(0);
		genericColumn.setType(Integer.class);
		genericColumn.setWidth(25);
		genericColumn.setEditable(false);
		addColumn(genericColumn);

		genericColumn = new GenericColumn();
		genericColumn.setTitle("Name");
		genericColumn.setIndex(1);
		genericColumn.setType(String.class);
		genericColumn.setWidth(400);
		genericColumn.setEditable(true);
		addColumn(genericColumn);
		
		CoveringLetterColumn coveringLetterColumn = new CoveringLetterColumn();
		coveringLetterColumn.setTitle("Covering Letter");
		coveringLetterColumn.setIndex(2);
		coveringLetterColumn.setType(CoveringLetterDTO.class);
		coveringLetterColumn.setWidth(300);
		coveringLetterColumn.setEditable(false);
		coveringLetterColumn.loadList();
		addColumn(coveringLetterColumn);
		
		genericColumn = new GenericColumn();
		genericColumn.setTitle("Status");
		genericColumn.setIndex(3);
		genericColumn.setType(StatusDTO.class);
		genericColumn.setWidth(10);
		genericColumn.setEditable(false);
		addColumn(genericColumn);
		
		genericColumn = new GenericColumn();
		genericColumn.setTitle("Recipients");
		genericColumn.setIndex(4);
		genericColumn.setType(RecipientCountDTO.class);
		genericColumn.setWidth(10);
		genericColumn.setEditable(false);
		addColumn(genericColumn);
		
	}
}
